//https://www.nowcoder.com/practice/6a668a3960e24d3ea04bba89109c6451?tpId=46&tqId=38942&rp=1&ru=/ta/classic-code&qru=/ta/classic-code&difficulty=1&judgeStatus=&tags=/question-ranking
/*
struct ListNode {
    int val;
    struct ListNode *next;
    ListNode(int x) : val(x), next(NULL) {}
};*/
class Remove {
public:
    bool removeNode(ListNode* pNode) {
        // write code here
        if (pNode->next == nullptr)
            return false;
        ListNode* p = pNode->next;
        pNode->val = pNode->next->val;
        pNode->next = pNode->next->next;
        delete p;
        return true;
    }
};